# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: James An <james@jamesan.ca>
# Contributor: Daniel Nagy <danielnagy at gmx de>

pkgname=libde265
pkgver=1.0.14
pkgrel=1
pkgdesc='Open h.265 video codec implementation'
arch=(loong64 x86_64)
url='https://github.com/strukturag/libde265'
license=(LGPL3)
depends=(gcc-libs
         glibc)
makedepends=(ffmpeg
             qt5-base
             sdl)
optdepends=('ffmpeg: for sherlock265'
            'qt5-base: for sherlock265'
            'sdl: dec265 YUV overlay output')
source=(https://github.com/strukturag/libde265/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('99f46ef77a438be639aa3c5d9632c0670541c5ed5d386524d4199da2d30df28f')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --enable-static=no
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install

# Remove useless tests binary
  rm "$pkgdir"/usr/bin/tests
}
